package cn.antscript.antLab.test {
	import flash.events.Event;
	import flash.events.MouseEvent;
	import com.actionsnippet.qbox.QuickObject;
	import flash.display.StageScaleMode;
	import flash.display.StageAlign;
	import flash.display.MovieClip;
	import com.actionsnippet.qbox.QuickBox2D;
	import flash.display.Sprite;

	/**
	 * @author ant
	 */
	public class Box2dTest extends MovieClip 
	{

		private var _box2d : QuickBox2D;
		private var _box : QuickObject;

		
		public function Box2dTest() {
			//stage.align=StageAlign.TOP_LEFT;
			stage.scaleMode=StageScaleMode.NO_SCALE;
			stage.frameRate=60;
			
			 
			
			_box2d=new QuickBox2D(this,{debug:true});
			_box2d.createStageWalls();
			
			_box2d.setDefault({fillColor:0xff99aa})
			
			_box=_box2d.addBox({x:5,y:5,scaleX:2,width:4,height:4,isBullet:true,angle:0.3,density:0});
			_box2d.addCircle({x:5,y:5,radius:3,isBullet:true,fillColor:0xff0099,lineColor:0x0000ff,lineAlpha:0,fillAlpha:0.5,
			density:0});
			_box2d.addPoly({x:10,y:5,verts:[[0,0,-1,-1,0,-1], [0,0,0,-1,2,2]],isBullet:true,fillColor:0xff0099,lineColor:0x0000ff,lineAlpha:0,fillAlpha:0.5,
			density:2});
			
			
			//_box2d.addEventListener(MouseEvent.MOUSE_OVER, onOver);
			
			addEventListener(Event.ENTER_FRAME, onOver)
			
			_box2d.start();
			_box2d.mouseDrag();
		}
		
		private function onOver(event : Event) : void
		{
			
		}
	}
}
